package com.guobox.movies.entity;

import com.guobox.movies.R;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by xuxinlei on 2017/7/22.
 */

public class MovieSort {
    private int sortId;
    private String sortName;
    private int sortResF;
    private int sortResUf;

    public int getSortId() {
        return sortId;
    }

    public void setSortId(int sortId) {
        this.sortId = sortId;
    }

    public String getSortName() {
        return sortName;
    }

    public void setSortName(String sortName) {
        this.sortName = sortName;
    }

    public int getSortResF() {
        return sortResF;
    }

    public void setSortResF(int sortResF) {
        this.sortResF = sortResF;
    }

    public int getSortResUf() {
        return sortResUf;
    }

    public void setSortResUf(int sortResUf) {
        this.sortResUf = sortResUf;
    }

    private static final String[] SortItems = {
            "name",
            "year"
    };
    private static final int[] SortResUf = {
            R.drawable.sort_name,
            R.drawable.sort_time
    };
    private static final int[] SortResF = {
            R.drawable.sort_name_f,
            R.drawable.sort_time_f
    };
    public static List<MovieSort> getSorts() {
        List<MovieSort> movieSorts = new ArrayList<>();
        MovieSort movieSort;
        for (int i = 0;i<SortItems.length;i++) {
            movieSort = new MovieSort();
            movieSort.setSortId(i);
            movieSort.setSortName(SortItems[i]);
            movieSort.setSortResF(SortResF[i]);
            movieSort.setSortResUf(SortResUf[i]);
            movieSorts.add(movieSort);
        }
        return movieSorts;
    }
}
